import React, { useCallback } from "react";
import "./index.less";
/**
 * @description 简易按钮
 * @param {Object} props
 * @param {()=>void} [props.onClick] - 点击事件
 * @param {React.ReactNode} [props.children] - 子节点
 * @returns {React.JSX.Element}
 */
export const Button = (props) => {
  const { onClick, children } = props;
  const handleOnClick = useCallback(() => {
    onClick && onClick();
  }, []);
  return (
    <button className="simple-button simple-button-middle simple-button-primary" onClick={handleOnClick}>
      {children || "按钮"}
    </button>
  );
};
